export class Yours {

  private _scene: BABYLON.Scene;

  public constructor(scene: BABYLON.Scene) {
    this._scene = scene
  }

  public doSomething() {
    console.log('你自己的代码逻辑');

    this._scene.onKeyboardObservable.add(kbInfo => {
      if (kbInfo.type === BABYLON.KeyboardEventTypes.KEYDOWN) {
        if (kbInfo.event.keyCode === 81 && kbInfo.event.ctrlKey) {
          console.warn('键盘Q按下');

          if (this._scene.debugLayer.isVisible()) {
            this._scene.debugLayer.hide();
          }
          else {
            // 此处修改了babylon.d.ts文件
            this._scene.debugLayer.show({ embedMode: true });
          }
        }
      }
    });
  }


}